package com.sc.VenusQueryBeta.ui.activites.details;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.AppBarLayout;
import android.view.Gravity;
import android.view.View;

import com.hengjun.kingstar.sdk.base.BasePresenter;
import com.hengjun.kingstar.sdk.utils.DisplayUtils;
import com.hengjun.kingstar.sdk.utils.StatusBarUtils;
import com.sc.VenusQueryBeta.R;
import com.sc.VenusQueryBeta.contract.detail.AboutUsContract;
import com.sc.VenusQueryBeta.presenter.detail.AboutUsPresenter;

public class AboutUsActivity extends BaseWebViewLoadActivity<AboutUsContract.AboutUsPresenter> implements AboutUsContract.IAboutUsView {


    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) appBar.getChildAt(0)
                .getLayoutParams();
        // 控件的高强制设成56dp+状态栏高度，重新定义AppBarLayout的高度
        params.height = DisplayUtils.dp2px(56) + StatusBarUtils.getStatusBarHeight
                (mContext);
        tvDetailTitle.setGravity(Gravity.CENTER_VERTICAL);
        tvTitle.setText(R.string.aboutus);
//        toolbar.setVisibility(View.GONE);
    }



    @NonNull
    @Override
    public BasePresenter initPresenter() {
        return AboutUsPresenter.newInstance();
    }



    @Override
    protected void loadDetail() {
        mPresenter.loadDailyDetail("");
    }

    @Override
    protected String getToolbarTitle() {
        return "關於我们";
    }

    @Override
    public void showDailyDetail(Object bean) {
        flNetView.setVisibility(View.GONE);
        nswvDetailContent.loadUrl("https://venusgroup-suncity.com/index.php");
    }
}
